package com.lechi.web.runner;

import com.lechi.web.listener.FileJnotifyAdapter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * The type Watch file runner.
 */
@Slf4j
@Component
@Order(8)
public class WatchFileRunner implements CommandLineRunner {

    @Autowired
    private FileJnotifyAdapter jnotifyAdapter;

    @Override
    public void run(String... args) throws Exception {
        jnotifyAdapter.beginWatch();
    }
}
